<template>
  <div style="padding: 40px">
    <el-table :data="evaluateList"
              height="580">
      <el-table-column property="user.nickname" label="评论用户" width="300"></el-table-column>
      <el-table-column property="workerEvaluate.content" label="评价内容" width="300" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column property="workerEvaluate.createTime" label="日期" width="380" sortable></el-table-column>
      <el-table-column property="workerEvaluate.type" width="180" label="满意程度">
        <template slot-scope="scope">
          <el-tag v-if="scope.row.workerEvaluate.type==='非常满意'" type="success">非常满意</el-tag>
          <el-tag v-if="scope.row.workerEvaluate.type==='满意'" type="info">满意</el-tag>
          <el-tag v-if="scope.row.workerEvaluate.type==='不满意'" type="danger">不满意</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  import {ListWorkerEvaluate} from "@/api/leaving";

  export default {
    name: "Evaluate",

    data() {
      return {
        evaluateList: []
      }
    },

    mounted() {
      ListWorkerEvaluate(localStorage.getItem("wid")).then(res => {
        this.evaluateList = res.data
      });

    },

  }
</script>

<style scoped>

</style>
